import java.util.Scanner;

public class Test1 {
    public static int fac(int n) {
        if(n==0||n==1){
            return 1;
        }
        return n*fac(n-1);
    }
    public static void main(String[] args){
        Scanner scanner=new Scanner(System.in);
        System.out.println("输入一个正整数:");
        int n=scanner.nextInt();
        System.out.println(n+"的阶乘是:"+fac(n));
    }
}
